\(\int \frac {\csc ^5(x)}{i+\cot (x)} \, dx\) [9]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 28 \[ \int \frac {\csc ^5(x)}{i+\cot (x)} \, dx=\frac {1}{2} i \text {arctanh}(\cos (x))+\frac {1}{2} i \cot (x) \csc (x)-\frac {\csc ^3(x)}{3} \]

[Out]

1/2*I*arctanh(cos(x))+1/2*I*cot(x)*csc(x)-1/3*csc(x)^3

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3582, 3853, 3855} \[ \int \frac {\csc ^5(x)}{i+\cot (x)} \, dx=\frac {1}{2} i \text {arctanh}(\cos (x))-\frac {1}{3} \csc ^3(x)+\frac {1}{2} i \cot (x) \csc (x) \]

[In]

Int[Csc[x]^5/(I + Cot[x]),x]

[Out]

(I/2)*ArcTanh[Cos[x]] + (I/2)*Cot[x]*Csc[x] - Csc[x]^3/3

Rule 3582

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[d^2*(
d*Sec[e + f*x])^(m - 2)*((a + b*Tan[e + f*x])^(n + 1)/(b*f*(m + n - 1))), x] + Dist[d^2*((m - 2)/(a*(m + n - 1
))), Int[(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2
 + b^2, 0] && LtQ[n, 0] && GtQ[m, 1] &&  !ILtQ[m + n, 0] && NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = -\frac {1}{3} \csc ^3(x)-i \int \csc ^3(x) \, dx \\ & = \frac {1}{2} i \cot (x) \csc (x)-\frac {\csc ^3(x)}{3}-\frac {1}{2} i \int \csc (x) \, dx \\ & = \frac {1}{2} i \text {arctanh}(\cos (x))+\frac {1}{2} i \cot (x) \csc (x)-\frac {\csc ^3(x)}{3} \\ \end{align*}

Mathematica [B] (verified)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(67\) vs. \(2(28)=56\).

Time = 0.26 (sec) , antiderivative size = 67, normalized size of antiderivative = 2.39 \[ \int \frac {\csc ^5(x)}{i+\cot (x)} \, dx=\frac {1}{24} i \csc ^3(x) \left (8 i+9 \left (\log \left (\cos \left (\frac {x}{2}\right )\right )-\log \left (\sin \left (\frac {x}{2}\right )\right )\right ) \sin (x)+6 \sin (2 x)-3 \log \left (\cos \left (\frac {x}{2}\right )\right ) \sin (3 x)+3 \log \left (\sin \left (\frac {x}{2}\right )\right ) \sin (3 x)\right ) \]

[In]

Integrate[Csc[x]^5/(I + Cot[x]),x]

[Out]

(I/24)*Csc[x]^3*(8*I + 9*(Log[Cos[x/2]] - Log[Sin[x/2]])*Sin[x] + 6*Sin[2*x] - 3*Log[Cos[x/2]]*Sin[3*x] + 3*Lo
g[Sin[x/2]]*Sin[3*x])

Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 57 vs. \(2 (20 ) = 40\).

Time = 0.10 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.07

method result size
default \(-\frac {\tan \left (\frac {x}{2}\right )}{8}-\frac {\tan \left (\frac {x}{2}\right )^{3}}{24}-\frac {i \tan \left (\frac {x}{2}\right )^{2}}{8}-\frac {i \ln \left (\tan \left (\frac {x}{2}\right )\right )}{2}+\frac {i}{8 \tan \left (\frac {x}{2}\right )^{2}}-\frac {1}{24 \tan \left (\frac {x}{2}\right )^{3}}-\frac {1}{8 \tan \left (\frac {x}{2}\right )}\) \(58\)
risch \(-\frac {i \left (3 \,{\mathrm e}^{5 i x}-8 \,{\mathrm e}^{3 i x}-3 \,{\mathrm e}^{i x}\right )}{3 \left ({\mathrm e}^{2 i x}-1\right )^{3}}+\frac {i \ln \left ({\mathrm e}^{i x}+1\right )}{2}-\frac {i \ln \left ({\mathrm e}^{i x}-1\right )}{2}\) \(58\)

[In]

int(csc(x)^5/(I+cot(x)),x,method=_RETURNVERBOSE)

[Out]

-1/8*tan(1/2*x)-1/24*tan(1/2*x)^3-1/8*I*tan(1/2*x)^2-1/2*I*ln(tan(1/2*x))+1/8*I/tan(1/2*x)^2-1/24/tan(1/2*x)^3
-1/8/tan(1/2*x)

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 99 vs. \(2 (18) = 36\).

Time = 0.28 (sec) , antiderivative size = 99, normalized size of antiderivative = 3.54 \[ \int \frac {\csc ^5(x)}{i+\cot (x)} \, dx=-\frac {3 \, {\left (-i \, e^{\left (6 i \, x\right )} + 3 i \, e^{\left (4 i \, x\right )} - 3 i \, e^{\left (2 i \, x\right )} + i\right )} \log \left (e^{\left (i \, x\right )} + 1\right ) + 3 \, {\left (i \, e^{\left (6 i \, x\right )} - 3 i \, e^{\left (4 i \, x\right )} + 3 i \, e^{\left (2 i \, x\right )} - i\right )} \log \left (e^{\left (i \, x\right )} - 1\right ) + 6 i \, e^{\left (5 i \, x\right )} - 16 i \, e^{\left (3 i \, x\right )} - 6 i \, e^{\left (i \, x\right )}}{6 \, {\left (e^{\left (6 i \, x\right )} - 3 \, e^{\left (4 i \, x\right )} + 3 \, e^{\left (2 i \, x\right )} - 1\right )}} \]

[In]

integrate(csc(x)^5/(I+cot(x)),x, algorithm="fricas")

[Out]

-1/6*(3*(-I*e^(6*I*x) + 3*I*e^(4*I*x) - 3*I*e^(2*I*x) + I)*log(e^(I*x) + 1) + 3*(I*e^(6*I*x) - 3*I*e^(4*I*x) +
 3*I*e^(2*I*x) - I)*log(e^(I*x) - 1) + 6*I*e^(5*I*x) - 16*I*e^(3*I*x) - 6*I*e^(I*x))/(e^(6*I*x) - 3*e^(4*I*x)
+ 3*e^(2*I*x) - 1)

Sympy [F]

\[ \int \frac {\csc ^5(x)}{i+\cot (x)} \, dx=\int \frac {\csc ^{5}{\left (x \right )}}{\cot {\left (x \right )} + i}\, dx \]

[In]

integrate(csc(x)**5/(I+cot(x)),x)

[Out]

Integral(csc(x)**5/(cot(x) + I), x)

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 83 vs. \(2 (18) = 36\).

Time = 0.24 (sec) , antiderivative size = 83, normalized size of antiderivative = 2.96 \[ \int \frac {\csc ^5(x)}{i+\cot (x)} \, dx=\frac {{\left (\frac {3 i \, \sin \left (x\right )}{\cos \left (x\right ) + 1} - \frac {3 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - 1\right )} {\left (\cos \left (x\right ) + 1\right )}^{3}}{24 \, \sin \left (x\right )^{3}} - \frac {\sin \left (x\right )}{8 \, {\left (\cos \left (x\right ) + 1\right )}} - \frac {i \, \sin \left (x\right )^{2}}{8 \, {\left (\cos \left (x\right ) + 1\right )}^{2}} - \frac {\sin \left (x\right )^{3}}{24 \, {\left (\cos \left (x\right ) + 1\right )}^{3}} - \frac {1}{2} i \, \log \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) \]

[In]

integrate(csc(x)^5/(I+cot(x)),x, algorithm="maxima")

[Out]

1/24*(3*I*sin(x)/(cos(x) + 1) - 3*sin(x)^2/(cos(x) + 1)^2 - 1)*(cos(x) + 1)^3/sin(x)^3 - 1/8*sin(x)/(cos(x) +
1) - 1/8*I*sin(x)^2/(cos(x) + 1)^2 - 1/24*sin(x)^3/(cos(x) + 1)^3 - 1/2*I*log(sin(x)/(cos(x) + 1))

Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 62 vs. \(2 (18) = 36\).

Time = 0.26 (sec) , antiderivative size = 62, normalized size of antiderivative = 2.21 \[ \int \frac {\csc ^5(x)}{i+\cot (x)} \, dx=-\frac {1}{24} \, \tan \left (\frac {1}{2} \, x\right )^{3} - \frac {1}{8} i \, \tan \left (\frac {1}{2} \, x\right )^{2} - \frac {-22 i \, \tan \left (\frac {1}{2} \, x\right )^{3} + 3 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 3 i \, \tan \left (\frac {1}{2} \, x\right ) + 1}{24 \, \tan \left (\frac {1}{2} \, x\right )^{3}} - \frac {1}{2} i \, \log \left (\tan \left (\frac {1}{2} \, x\right )\right ) - \frac {1}{8} \, \tan \left (\frac {1}{2} \, x\right ) \]

[In]

integrate(csc(x)^5/(I+cot(x)),x, algorithm="giac")

[Out]

-1/24*tan(1/2*x)^3 - 1/8*I*tan(1/2*x)^2 - 1/24*(-22*I*tan(1/2*x)^3 + 3*tan(1/2*x)^2 - 3*I*tan(1/2*x) + 1)/tan(
1/2*x)^3 - 1/2*I*log(tan(1/2*x)) - 1/8*tan(1/2*x)

Mupad [B] (verification not implemented)

Time = 12.75 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.96 \[ \int \frac {\csc ^5(x)}{i+\cot (x)} \, dx=-\frac {\mathrm {tan}\left (\frac {x}{2}\right )}{8}-\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )\,1{}\mathrm {i}}{2}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,1{}\mathrm {i}}{8}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^3}{24}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2-\mathrm {tan}\left (\frac {x}{2}\right )\,1{}\mathrm {i}+\frac {1}{3}}{8\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3} \]

[In]

int(1/(sin(x)^5*(cot(x) + 1i)),x)

[Out]

- tan(x/2)/8 - (log(tan(x/2))*1i)/2 - (tan(x/2)^2*1i)/8 - tan(x/2)^3/24 - (tan(x/2)^2 - tan(x/2)*1i + 1/3)/(8*
tan(x/2)^3)